<%@ page language="java" pageEncoding="UTF-8"%>

<div class="hider" id="hider">
	<span>&nbsp;</span>
</div>
<div class="position">
	<img src="../images/position2.jpg" style="padding: 7px 9px; float: left;" />当前位置：中国石化安全问题管理平台 &gt;&gt; 系统管理
</div>

<div class="tt">管理员登录</div>
<div class="content">
	<table align="center" border="0" width="700" cellpadding="0"
		cellspacing="0">
		<!-- <tr>
			<td class="td1" height="35">
				<span style="margin-left: 100px" class="span1">身 份：</span>
				<select name="loginType" id="loginType">
					<option value="1">员工</option>
					<option value="2">系统管理员</option>
				</select>
			</td>
		</tr>  -->
		<tr>
			<td class="td1" height="35">
				<span style="margin-left: 250px" class="span1">用户名：</span>
				<input type="text" name="adminName" id="adminName" size="20" />
			</td>
		</tr>
		<tr>
			<td class="td1" height="35">
				<span style="margin-left: 250px" class="span1">密 &nbsp; &nbsp; 码：</span>
				<input type="password" name="password" id="password" size="20" />
			</td>
		</tr>
		<tr>
			<td class="td1" height="35">
				<input style="margin-left: 330px" type="button" value="登 录" onclick="login()" />
			</td>
		</tr>
	</table>
</div>

<script type="text/javascript">
function login() {
	openWaitingDialog('waitingDialog');
	$.ajax({
		type:'post',
		url:'login_process.jsp',
		data:{
			//loginType: getElementValueByID('loginType'),
			adminName: getElementValueByID('adminName'),
			password: getElementValueByID('password')
		},
		success:function(data,state,xmlhttp){
			var obj = null;
			try {
				obj = eval('(' + data + ')');
			} catch (e) {
			}
			if (typeof(obj.isSuccess) != 'undefined') {
				closeWaitingDialog('waitingDialog');
				if (obj.isSuccess == 'true') {
					loadPageSection('<%=request.getContextPath()%>/admin/admin_infor.jsp', 'mainContentDiv');
					loadPageSection('<%=request.getContextPath()%>/admin/menu.jsp', 'mainMenuDiv');
				} else {
					$.dialog.alert(obj.error);
				}
			}
		}
	});
}
</script>